<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>cache</title>
</head>
<body>
    <button id="btn">send</button>
    <button id="btn1">send1</button>
    <button id="btn2">send2</button>
    <button id="btn3">send3</button>
    <script>
        document.getElementById('btn').addEventListener('click', () => {
            fetch('http://localhost:3000/api')
                .then(res => res.text())
                .then(data => console.log(data))
        })
        document.getElementById('btn1').addEventListener('click', () => {
            fetch('http://localhost:3000/api1')
                .then(res => res.text())
                .then(data => console.log(data))
        })
        document.getElementById('btn2').addEventListener('click', () => {
            fetch('http://localhost:3000/api2')
                .then(res => res.text())
                .then(data => console.log(data))
        })
        document.getElementById('btn3').addEventListener('click', () => {
            fetch('http://localhost:3000/api3')
                .then(res => res.text())
                .then(data => console.log(data))
        })
    </script>
</body>
</html>